package com.se2.antiqueexhibition.Service.impl;

import com.se2.antiqueexhibition.Mapper.AdminAnnouncementMapper;
import com.se2.antiqueexhibition.Mapper.AdminNewsMapper;
import com.se2.antiqueexhibition.Service.AdminNewsService;
import com.se2.antiqueexhibition.pojo.AdminAnnouncement;
import com.se2.antiqueexhibition.pojo.AdminNews;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminNewsServiceimpl implements AdminNewsService {

    @Resource
    private AdminNewsMapper adminNewsMapper;


    @Override
    public void insert(AdminNews a) {
        adminNewsMapper.insert(a);
    }

    @Override
    public void delete(int id) {
        adminNewsMapper.delete(id);
    }

    @Override
    public void update(AdminNews a) {
        adminNewsMapper.update(a);
    }


    @Override
    public List<AdminNews> getAllNews() {
        return adminNewsMapper.selectAll();
    }

    @Override
    public void updateStatus(AdminNews a) {
        adminNewsMapper.update(a);
    }
}
